import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

export default new Vuex.Store({
  state: {
    LOADING: false,

    // 文件目录ID, 用于操作完返回当前页面
    DirectoryId: ''
  },
  mutations: {
    showLoading(state){
      state.LOADING = true    
    },
    hideLoading (state) {
        state.LOADING = false
    },
    // 储存文件目录ID, 用于操作完返回当前页面
    StorageDirectoryId(state, id){
      state.DirectoryId = id
    },
    // 重置文件目录ID
    ResetDirectoryId(state){
      state.DirectoryId = ''
    }
  },
  actions: {
  },
  modules: {
  }
})
